####################################
Replication of “The Electoral Cycle Effect in Parliamentary Democracies” 
(Stefan Müller, and Tom Louwerse)
####################################


Abstract: Does government party support decline in a monotonic fashion throughout the legislative cycle or do we observe a u-shaped ‘electoral cycle effect’? Moving beyond the study of midterm election results, this is the first study to assess the cyclical pulse of government party support in parliamentary democracies based on over 25,000 voting intention polls from 171 cycles in 22 countries. On average, government parties lose support during the first half of the electoral cycle, but at most partially recover from their initial losses. Under single-party government and when prime ministers control cabinet dissolution, support tends to follow the previously assumed u-shaped pattern more strongly. Finally, we find that government parties hardly recover from early losses since the 2000s.


Information on the Replication Material

Please open the file electoral_cycle_effect_psrm.Rproj and run the following scripts to reproduce the results.

* 01_models_plots_tables.R: reproduces all regression models, plots, and tables with the exception of the plots and tables based on the NLME models as running these models takes a long time.

* 02_models_plots_tables_nlme.R: reproduces all regression models, plots, and tables based on the nlme package (this file takes a long time to run).

* helper.R: files with helper functions for the ggplot2 theme and the texreg package. No need to run this file directly, as it will be loaded automatically in the scripts above. 

Datasets in included in the folder:
* data.rds: An rds file that contains all variables necessary to reproduce the results. The variable coding and summary statistics are provided in the file codebook.pdf.

The scripts were executed successfully with the following versions of the required packages (2018-08-14):

 [1] nlme_3.1-137    ggthemes_3.4.2  stargazer_5.2.1 pastecs_1.3.21 
 [5] car_3.0-0       texreg_1.36.23  effects_4.0-2   carData_3.0-1  
 [9] lme4_1.1-17     Matrix_1.2-14   forcats_0.3.0   stringr_1.3.1  
[13] dplyr_0.7.6     purrr_0.2.5     readr_1.1.1     tidyr_0.8.1    
[17] tibble_1.4.2    ggplot2_2.2.1   tidyverse_1.2.1